﻿using OnlineMealOrdering.Common;
using OnlineMealOrdering.Domain.Base;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace OnlineMealOrdering.Models
{
    public abstract class ModelBase
    {
        #region Properties

        public static IDomainContext Ctx
        {
            get
            {
                if (DomainContext.Current == null)
                    throw EPSystemException.Create("当前OnlineStoreDbContext 为空");

                return DomainContext.Current;
            }
        }

        public string Title { get; set; }


        #endregion

    }

    public abstract class EntityModelBase : ModelBase
    {
        public string SubmitButtonText { get; set; }
        public EnumOperationMode OperationMode { get; set; }
        public DateTime CreatedDate { get; set; }
        public DateTime UpdatedDate { get; set; }
    }

    
}